package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.*;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NewsDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(NewsDetail record);

    NewsDetail selectByPrimaryKey(Long id);

    List<NewsDetail> queryForList(QueryObject qo);

    int updateByPrimaryKey(NewsDetail record);

    Long selectSequenceBynewsCatalogId(@Param("newsCatalogId") long newsCatalogId);

    List<NewsDetail> selectNewsByState(@Param("state") Integer state);

    /**
     * 红色没有报错可用
     * @param id
     * @return
     */
    int[] selectId(@Param("id") Long id, @Param("type") int type);

    List<NewsDetail> selectDetailByids(@Param("ids") int[] ids);

}